#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "debugdialog.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_goButton_clicked()
{
    ui->webEngineView->load(ui->urlEdit->text());
}

void MainWindow::on_refreshButton_clicked()
{
    ui->webEngineView->reload();
}

void MainWindow::on_urlEdit_returnPressed()
{
    on_goButton_clicked();
}

void MainWindow::on_actionDebug_triggered()
{
    DebugDialog* dialog = new DebugDialog(this);
    dialog->show();
}
